<!DOCTYPE html>
<html lang="en">
<head>
<title>学而阅读-打赏</title> <#include "/common/head.ftl"/>
<link rel="stylesheet" href="${path}/css/reward.css" />
<script type="text/javascript">
	$(function() {

		$("#payAmount").val("1");
		//选择购买数量
		$(".award-list a").on("click", function() {
			$(this).addClass("active").siblings().removeClass("active");
			var payAmount = $(this).attr("data-value");
			$("#payAmount").val(payAmount);
			$("#displayAmount").html(payAmount*100);
		});
	});
	function payClick() {
		$("#form1").submit();
	}
</script>
</head>
<body>
	<#include "/common/header.ftl"/> <#include "/common/nav.ftl"/>
	<!-- 主内容 -->
	<form action="${path}/user/userRewardSave" method="post" id="form1">
		<div class="reward">
			<a class="btn-delete fr"></a>
			<div class="award-list">
				<a class="f36 active" data-value="1"><span class="f42">100</span>书币</a>
				<a class="f36" data-value="5.88"><span class="f42">588</span>书币</a>
				<a class="f36 last" data-value="18.88"><span class="f42">1888</span>书币</a>
				<a class="f36" data-value="100"><span class="f42">1万</span>书币</a> <a
					class="f36" data-value="500"><span class="f42">5万</span>书币</a> <a
					class="f36 last" data-value="1000"><span class="f42">10万</span>书币</a>
			</div>
			<div class="money">
				<span class="f36 dlb">应付书币：<span id="displayAmount">100</span>书币
				
			</div>
			<input type="hidden" id="payAmount" name="payAmount" value="0">
			<input type="hidden" id="authorId" name="authorId" value="${(book.bookAuthorId)!0}">
			<input type="hidden" id="bookId" name="bookId" value="${(book.bookId)!0}">
			<input type="hidden" id="bookName" name="bookName" value="${(book.bookName)!''}">
			<input type="hidden" id="bookAuthorNickname" name="bookAuthorNickname" value="${(book.bookAuthorNickname)!''}">
			<a class="btn-award cfff tc f42" href="#" onclick="payClick();">确定</a>
			<div class="recordlist">
				<div class="recordlist-title f42 c323232">最近打赏</div>
				<ul>
					<#list payList as pay>
					<li><img class="useravator fl" src="${path}/image/ui/hot-img.png" />
						<div class="list fl">
							<div class="username f30 c323232">${(pay.userNickname)!''}</div>
							<div class="record f24">打赏了${((pay.payAmount)!0)*100}书币</div>
						</div>
						<div class="recordtime fr f24">${(pay.payDate?string("yyyy-MM-dd
							HH:mm:ss"))!''}</div></li> </#list>
				</ul>
			</div>
		</div>
	</form>
	<#include "/common/footer.ftl"/>
</body>
</html>